home *** CD-ROM | disk | FTP | other *** search
- Path: solaris.cc.vt.edu!usenet
- From: Salah Almajdoub <salah@whistle.ee.vt.edu>
- Newsgroups: comp.lang.c++
- Subject: an STL vector of emun inside a class, BC++ 4.52
- Date: Mon, 18 Mar 1996 12:36:42 -0500
- Organization: Electrical Engineering, Virginia Tech
- Message-ID: <314D9F2A.4BC8@whistle.ee.vt.edu>
- NNTP-Posting-Host: dobro.ee.vt.edu
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Hi every body
-
- I've got a class "TNode" that includes an enumeration
- "TColor" and an STL vector of TCOLOR. BORLAND C++ 4.52
- won't accept it because it needs a destructor
- for the enum when it calls the template function
- "destroy" of STL. I tried to override the
- destroy funtion but BC++ won't consider it,
- BC++ would always consider the template version of destroy
- in STL and ignores mine, producing an error message.
-
- my code looks somthing like this
-
- class TNode {
- public:
- // enumeration is defined inside the class
- enum TColor {white, black, red, ... };
-
-
- TNode();
-
- protected:
- char * name;
-
- // a vector of enumeration inside the class
- vector<TColor> Color_List;
- }
-
- I tried to add the following function after the above code
-
- inline void destroy(TNode::TColor *) {}
-
- but BC++ won't accept it, yet it works
- on IBM C Set++ under AIX (only after destroy is overriden)
-
- any idea on how to make borland override the destroy
- function for this case?
-
- -- salah almajdoub
- sam@whistle.ee.vt.edu
-